#include "Observable.h"
#include "Observer.h"

Observable::Observable()
{
}

void Observable::addObserver(Observer* observer) {
	this->observers.push_back(observer);
}
void Observable::deleteObserver(Observer* observer) {
	this->observers.remove(observer);
}
void Observable::notifyObservers() {
	for (list<Observer*>::iterator it = observers.begin(); it != observers.end(); it++) {
		if(*it){
			(*it)->update(this);
		}
	}
}

Observable::~Observable()
{
}
